// pages/topic/index.js
import TopicModule from '../../models/3.0/topic'

Page({
  data: {
    list: [],
    joinList: [],
    active: 0
  },

  getList() {
    TopicModule.list().then((res) => {
      this.setData({
        list: res
      })
      console.log(res)
    })
  },

  myJoinList() {
    TopicModule.myJoinList().then((res) => {
      this.setData({
        joinList: res
      })
    })
  },

  onLoad() {
    this.getList()
    this.myJoinList()
  },

})
